﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace LevenBlog.Core.Entities
{
    /// <summary>
    ///表lb_blog
    /// </summary>
    [Serializable]
    [DataContract(Name = "simpleblog")]
    [Table("lb_blog", Info = "")]
    public class lb_simpleblog :BaseEntity
    {
        [DataMember]
        [Column("id", DataType.Int32, Length = 4, CanNull = false, AutoIncrement = true, PrimaryKey = true)]
        public int id { get; set; }

        [DataMember]
        [Column("categoryid", DataType.Int32, Length = 4, CanNull = false)]
        public int categoryid { get; set; }

        [DataMember]
        [Column("postuser", DataType.VarChar, Length = 255, CanNull = false)]
        public string postuser { get; set; }

        [DataMember]
        [Column("title", DataType.VarChar, Length = 1000, CanNull = false)]
        public string title { get; set; }

        [DataMember]
        [Column("intro", DataType.Text, CanNull = false)]
        public string intro { get; set; }

        [DataMember]
        [Column("posttime", DataType.DateTime, CanNull = false)]
        public DateTime posttime { get; set; }

        [DataMember]
        [Column("hits", DataType.Int32, Length = 4, CanNull = false)]
        public int hits { get; set; }

        [DataMember]
        [Column("commentnum", DataType.Int32, Length = 4, CanNull = false)]
        public int commentnum { get; set; }

        [DataMember]
        [Column("tracknum", DataType.Int32, Length = 4, CanNull = false)]
        public int tracknum { get; set; }

        [DataMember]
        [Column("tags", DataType.VarChar, Length = 2000)]
        public string tags { get; set; }

        [DataMember]
        [Column("istop", DataType.Bit, CanNull = false)]
        public bool istop { get; set; }

        [DataMember]
        [Column("isshow", DataType.Bit, CanNull = false)]
        public bool isshow { get; set; }

        [DataMember]
        [Column("islock", DataType.Bit, CanNull = false)]
        public bool islock { get; set; }

        [DataMember]
        [Table("lb_category")]
        public lb_category Category { get; set; }

        [DataMember]
        [LinkTables("lb_tagmap", SqlPrefix = "tm_")]
        public IList<lb_tagmap> tagmaps { get; set; }
    }
}
